function [ new_population ] = replacement( population, new_individuals )
%REPLACEMENT Summary of this function goes here
%   Detailed explanation goes here

global REPLACEMENT_METHOD;
global POPULATION;

old_population_size = POPULATION - length(new_individuals);

if REPLACEMENT_METHOD == 1
    new_population = elite(population, old_population_size);
elseif REPLACEMENT_METHOD == 2
    new_population = roulette(population, old_population_size);
elseif REPLACEMENT_METHOD == 3
    new_population = universal(population, old_population_size);
elseif REPLACEMENT_METHOD == 4
    new_population = boltzman(population, old_population_size);
elseif REPLACEMENT_METHOD == 5
    new_population = elite_roulette(population, old_population_size);    
else
    new_population = elite_boltzman(population, old_population_size);
end

new_population = [new_population new_individuals];

end